package com.dongdongshop.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.TbAreasMapper;
import com.dongdongshop.pojo.address.TbAreas;
import com.dongdongshop.pojo.address.TbAreasExample;
import com.dongdongshop.service.AreasServiceI;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
@Service
public class AreasServiceImpl implements AreasServiceI {
    @Resource
    private TbAreasMapper areasMapper;

    @Override
    public List<TbAreas> getCounty(String cityid) {
        TbAreasExample example=new TbAreasExample();
        TbAreasExample.Criteria criteria = example.createCriteria();
        criteria.andCityidEqualTo(cityid);
        return areasMapper.selectByExample(example);
    }
}
